package com.example.xlmkotlinwanandroid.network

import androidx.lifecycle.LiveData
import androidx.lifecycle.ViewModel
import androidx.paging.LivePagedListBuilder
import androidx.paging.PagedList

class ArticleViewModel2() : ViewModel() {

    var articlePageList: LiveData<PagedList<ArticleResponse2.ArticleBean2>>
    var config: PagedList.Config = PagedList.Config.Builder()
        .setEnablePlaceholders(false)
        .setPageSize(1)
        .setPrefetchDistance(20)
        .setInitialLoadSizeHint(80)
        .setMaxSize(65535 * 80)
        .build()

    init {
        articlePageList = LivePagedListBuilder(ArticleDataFactory(), config).build()
    }
}